<div>
    <div style='width: 790px;' data-dojo-type='ism.widgets.Dialog' data-dojo-attach-point='dialog'
        data-dojo-props='title: "${dialogTitle}", 
        instruction: "${instruction}",
            autofocus: false,
            onEnter: function() {
                if(!dijit.byId("${dialogId}_saveButton").get("disabled")) {
                    dojo.publish("${dialogId}_saveButton", ""); 
                } 
            },
            closeButtonLabel: "${nls.appliance.ltpaProfiles.cancelButton}",
            buttons: [ new dijit.form.Button({ 
                label: "${nls.appliance.ltpaProfiles.saveButton}",
                id: "${dialogId}_saveButton",
                onClick: function() { dojo.publish("${dialogId}_saveButton", ""); }
            }) ]'>

        <form id="${dialogId}_form" data-dojo-type="dijit.form.Form" data-dojo-attach-point="form">

            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_Name" data-dojo-attach-point='field_Name'
                data-dojo-props='fieldWidth: "210px",
                label: "${nameLabel}:",
                required: true,
                labelAlignment: "horizontal",
                tooltipContent: "${nameTooltip}",
                labelWidth: "180"'></div>

            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_ResourceURL" data-dojo-attach-point='field_ResourceURL'
                data-dojo-props='fieldWidth: "210px",
                pattern: "(h|H)(t|T)(t|T)(p|P)(s|S)?\:\/\/.*", 
                invalidMessage: "${urlThemeError}", 
                instantValidate: false,         
                label: "${resourceUrlLabel}:",
                required: true,
                labelAlignment: "horizontal",
                tooltipContent: "${resourceUrlTooltip}",
                labelWidth: "180"'></div>


            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_KeyFileName" data-dojo-attach-point='field_KeyFileName'
                data-dojo-props='fieldWidth: "210px", 
                label: "${privkeyLabel}:",
                required: false,
                alignWithRequired: true,
                readOnly: true,
                hint: "${browseHint}",
                hintPosition: "inside",
                labelAlignment: "horizontal",
                tooltipContent: "${privkeyTooltip}",
                labelWidth: "180"'></div>
            <div style="vertical-align:top; display: inline-block; margin-top: 0.2em;">
                <input type="file" id="${dialogId}_fileUploader" style="display:none"
                    data-dojo-attach-point="fileUploader" data-dojo-attach-event="onChange:handleFileChangeEvent" />
                <button id="${dialogId}_fileUploaderButton" data-dojo-type="dijit.form.Button" class="browseButton" 
                    tabindex="0" style="margin: 0" data-dojo-attach-event="onClick:clickFileUploaderButton">${browseLabel}</button>
                <button name="resetFileUploader" style="margin: 0" data-dojo-type="dijit.form.Button"
                    data-dojo-attach-point="resetFileUploader" data-dojo-attach-event="onClick:resetFiles"
                    id="${dialogId}_resetFileUploader">${nls.appliance.oAuthProfiles.reset}</button>
            </div>
            <select multiple="false" data-dojo-type='ism.widgets.Select'
                data-dojo-attach-point='field_CheckServerCert'
                id="${dialogId}_certCheck"
                data-dojo-props='label: "${checkcertLabel}", 
                                 required: false,
                                 labelAlignment: "horizontal",
                                 groupAlignment: "horizontal",
                                 tooltipContent: "${!checkcertTooltip}",
                                 alignWithRequired: true,
                                 labelWidth: "180px",
                                 inputWidth: "210px"
                                '>
                 <option value="TrustStore" selected="true">${checkcertTStoreOpt}</option>
                 <option value="PublicTrust">${checkcertPublicTOpt}</option>
                 <option value="DisableVerify">${checkcertDisableOpt}</option>
            </select>
            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_AuthKey" data-dojo-attach-point='field_AuthKey'
                data-dojo-props='fieldWidth: "210px", 
                label: "${authKeyLabel}:",
                value: "access_token",
                required: true,
                labelAlignment: "horizontal",
                tooltipContent: "${authKeyTooltip}",
                labelWidth: "180"'></div>
                
            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_UserInfoURL" data-dojo-attach-point='field_UserInfoURL'
                data-dojo-props='fieldWidth: "210px",
                pattern: "(h|H)(t|T)(t|T)(p|P)(s|S)?\:\/\/.*",   
                invalidMessage: "${urlThemeError}", 
                instantValidate: false,                                  
                label: "${userInfoUrlLabel}:",
                required: false,
                alignWithRequired: true,
                labelAlignment: "horizontal",
                tooltipContent: "${userInfoUrlTooltip}",
                labelWidth: "180"'></div>
                
            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_UserInfoKey" data-dojo-attach-point='field_UserInfoKey'
                data-dojo-props='fieldWidth: "210px", 
                label: "${userInfoKeyLabel}:",
                required: false,
                alignWithRequired: true,
                labelAlignment: "horizontal",
                tooltipContent: "${userInfoKeyTooltip}",
                labelWidth: "180"'></div>                               

            <div data-dojo-type='ism.widgets.TextBox' id="${dialogId}_GroupInfoKey" data-dojo-attach-point='field_GroupInfoKey'
                data-dojo-props='fieldWidth: "210px", 
                label: "${groupInfoKeyLabel}:",
                required: false,
                alignWithRequired: true,
                labelAlignment: "horizontal",
                tooltipContent: "${groupInfoKeyTooltip}",
                labelWidth: "180"'></div>

            <div>
               <select multiple="false" data-dojo-type='ism.widgets.Select'
                    data-dojo-attach-point='field_TokenSendMethod'
                    id="${dialogId}_TokenSendMethod"
                    data-dojo-props='label: "${tokenSendMethodLabel}", 
                                    required: false,
                                    labelAlignment: "horizontal",
                                    groupAlignment: "horizontal",
                                    tooltipContent: "${!tokenSendMethodTooltip}",
                                    alignWithRequired: true,
                                    labelWidth: "180px",
                                    inputWidth: "210px"
                                    '>
                    <option value="URLParam" selected="true">${tokenSendMethodURLParamOpt}</option>
                    <option value="HTTPHeader">${tokenSendMethodHTTPHeaderOpt}</option>
                    <option value="HTTPPost">${tokenSendMethodHTTPPostOpt}</option>
               </select>
           </div>
        </form>
    </div>
</div>

